<?php include_once("connection.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Personal Description: A two-column, fixed-width design.
Version    : 1.0
Released   : 20080513

-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="calender.js"></script>
<script type="text/javascript">
	function control(){
		var var1 = document.getElementById('title').value;
		var var2 = document.getElementById('text').value;
		var var3 = document.getElementById('date').value;
		if(var1.length!=0 && var2.length!=0 && var3.length!=0){
			return true;
		}
		else{
			alert("title ve link , date giriniz !");
			return false;
		}
	}
</script>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Bahar Çağlar's Personal Web Page</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="date.css" rel="stylesheet" type="text/css" media="screen" />
</head>

<body>
<?php
if(strlen($_POST["title"])!=0 ){
	mysql_query("insert into tbl_duyuru (d_title,d_text,d_date) values ('".$_POST["title"]."','".$_POST["text"]."','".$_POST["date"]."')");
}
?>
<!-- start header -->
<div id="header">
	<?php include_once("header.php"); ?>
</div>
<!-- end header -->
<!-- start page -->
<div id="wrapper">
	<div id="page">
				<!-- start content -->
				<div id="content">
				 		 <div class="post">
							<form method="post" action="duyadd.php" onsubmit="return control();">
                            	<table>
                                	<tr><th colspan="2" align="center"> Add New Announcement </th></tr>
                                    <tr>
                                    	<td><label for="title">Title:</label></td>
                                        <td><input type="text" name="title" id="title" value=""/></td>
                                    </tr>
                                    <tr>
                                    	<td><label for="text">Text:</label></td>
                                        <td><textarea name="text" id="text"></textarea></td>
                                    </tr>
                                    <tr><td><label for="date">Expire Date:</label></td>
                                    <td> <input name="date" id="date"> 
<input type=button value="select" onclick="displayDatePicker('date',false,'ymd','-');"></td></tr>
                                    <tr align="right"><td colspan="2"><input type="submit" name="submit" title="submit" value="send"/></td></tr>
                                </table>
                            </form>



					</div>
				</div>
				<!-- end content -->
				<!-- start sidebar -->
				<div id="sidebar">
				<?php include_once("sitebar.php"); ?>
				</div>
				<!-- end sidebar -->
				<div style="clear:both">&nbsp;</div>
	</div>
</div>
<div id="footer">
	<?php include_once("footer.php"); ?>
</div>
</body>
</html>
